package game;

import java.awt.Graphics2D;
import java.awt.geom.Point2D;
import java.util.LinkedList;

public class MatrixType extends Scene{
	
	GameObject bg;
	LinkedList<Button> buttons = new LinkedList<Button>();
	private static double matrixType[][];

	public MatrixType()
	{
		bg = new Background("/images/bg_MatrixType.png", new Point2D.Double(0,0), new Point2D.Double(800, 600));
		for (int i = 0; i < 2; i++)
			buttons.add(new Button("/images/MatrixType.png", new Point2D.Double(250 + i * 200, 300), new Point2D.Double(100, 50), 
															  new Point2D.Double(0, i * 50), new Point2D.Double(100, 50)));
	}
	
	@Override
	public void update() {
		
		for (int i = 0; i < buttons.size(); i++)
		{
			buttons.get(i).update();
			if (buttons.get(i).released == true)
			{
				matrixType = new double[i + 2][i + 2];
				SceneManager.ChangeScene();
			}
		}
	}
	
	@Override
	public void draw(Graphics2D g2d) {
		bg.draw(g2d);
		for (Button button: buttons)
			button.draw(g2d);
	}
	
	public static double[][] getMatrixType() {
		return matrixType;
	}

	public static void setMatrixType(double[][] matrixType) {
		MatrixType.matrixType = matrixType;
	}

}
